package com.bootcamp.ex1125.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

import javax.sql.DataSource;

/**
 * @program: spring-1125-mvc-java-config
 * @description:
 * @author: Keyu Li
 * @create: 2021-11-25 11:18
 **/

/*
 * 对 Mybatis 的整合
 * 1. 排除 controller（由mvc配置类初始化）
 * 2. 排除 nvc配置类（ EnableWebMvc也会注册自身）
 * */
@ComponentScan(value = "com.bootcamp.ex1125",
        excludeFilters = @ComponentScan.Filter({Controller.class, EnableWebMvc.class}))
@Configuration

public class SpringConfiguration {
}
